package com.itheima.domain;
//这是一个子类Student类;
public class Student extends Person {
    //由于构造方法没有办法继承,所以子类需要重写构造方法;

    public Student() {
    }

    public Student(int id, String name, String sex, String birthday, int age) {
        super(id, name, sex, birthday, age);
    }

    @Override
    public String getType() {
        String s = "学生";
        return s;
    }

    @Override
    public String  getWork() {
        String s = "学习Java";
        return s;
    }

}
